export const imgLocalUrl = (imgPath) => {
  try {
    const path = imgPath.replace('@', '..')
    // https://vitejs.cn/guide/assets.html#the-public-directory
    return new URL(path, import.meta.url).href
  } catch (error) {
    console.warn(error)
  }
}
